home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / virus / fpro210c.zip / VIRUS.DOC < prev   
Text File  |  1993-02-03  |  11KB  |  217 lines

  1.  
  2.                          Computer Viruses: An Introduction
  3.  
  4. A very simple definition of computer viruses is:
  5.  
  6.         "A program that modifies other programs by placing a copy of 
  7.          itself inside them."
  8.  
  9. This definition is somewhat simplified, and does not cover all virus
  10. types, but is sufficient to show the major difference between viruses and
  11. so-called "Trojan" programs, which is that the virus replicates, but the
  12. Trojan does not.  (The definition does not cover the so-called
  13. "companion"-type viruses, however).
  14.  
  15. A Trojan is a program that pretends to do something useful (or at least
  16. interesting), but when it is run, it may have some harmful effect, like
  17. scrambling your FAT (File Allocation Table) or formatting the hard disk.
  18.  
  19. Viruses and Trojans may contain a "time-bomb", intended to destroy
  20. programs or data on a specific date or when some condition has been
  21. fulfilled.
  22.  
  23. A time bomb is often designed to be harmful, maybe doing something like
  24. formatting the hard disk.  Sometimes it is relatively harmless, perhaps 
  25. slowing the computer down every Friday or making a ball bounce around the
  26. screen.  However, there is really no such thing as a harmless virus.  Even if
  27. a virus has been intended to cause no damage, it may do so in certain cases,
  28. often due to the incompetence of the virus writer.  A virus may be modified,
  29. either by the original author or someone else, so that a more harmful version
  30. of it appears.  It is also possible that the modification produces a less
  31. harmful virus, but that has only rarely happened.
  32.  
  33. The damage caused by a virus may consist of the deletion of data or
  34. programs, maybe even reformatting of the hard disk, but more subtle damage
  35. is also possible.  Some viruses may modify data or introduce typing errors
  36. into text.  Other viruses may have no intentional effects other than just
  37. replicating.
  38.  
  39. Two different groups of viruses occur on PCs, boot sector viruses (BSV)
  40. and program viruses, although a few viruses belong to both groups.
  41.  
  42. A BSV infects the boot sector on a diskette.  Normally the boot sector
  43. contains code to load the operating system files.  The BSV replaces the
  44. original boot sector with itself and stores the original boot sector
  45. somewhere else on the diskette or simply replaces it totally.  When a
  46. computer is then later booted from this diskette, the virus takes control
  47. and hides in RAM.  It will then load and execute the original boot sector,
  48. and from then on everything will be as usual.  Except, of course, that
  49. every diskette inserted in the computer will be infected with the virus,
  50. unless it is write-protected.  
  51.  
  52. A BSV will usually hide at the top of memory, reducing the amount of
  53. memory that the DOS sees.  For example, a computer with 640K might appear
  54. to have only 639K.
  55.  
  56. Many BSVs are also able to infect hard disks, where the process is similar
  57. to that described above, although they may infect the master boot
  58. record instead of the DOS boot record.
  59.  
  60. Program viruses, the second type of computer viruses, infect executable
  61. programs, usually .COM and .EXE files, but sometimes also overlay files.
  62. An infected program will contain a copy of the virus, usually at the end,
  63. but in some cases at the beginning of the original program.
  64.  
  65. When an infected program is run, the virus may stay resident in memory
  66. and infect every program run.  Viruses using this method to spread the
  67. infection are called "Resident Viruses".
  68.  
  69. Other viruses may search for a new file to infect, when an infected
  70. program is executed.  The virus then transfers control to the original
  71. program.  Viruses using this method to spread the infection are
  72. called "Direct Action Viruses".  It is possible for a virus to use both
  73. methods of infection.
  74.  
  75. Most viruses try to recognize existing infections, so they do not infect
  76. what has already been infected.  This makes it possible to inoculate
  77. against specific viruses, by making the "victim" appear to be infected.
  78. However, this method is useless as a general defense, as it is not 
  79. possible to inoculate the same program against multiple viruses.
  80.  
  81. In general, viruses are rather unusual programs, rather simple, but written
  82. just like any other program.  It does not take a genius to write one - any
  83. average assembly language programmer can easily do it.  Fortunately, few of
  84. them do.
  85.  
  86. Now - to correct some common misconceptions, here are a few bits of
  87. information about what viruses cannot do.
  88.  
  89.         A virus cannot spread from one type of computer to another.
  90.         For example, a virus designed to infect Macintosh computers cannot
  91.         infect PCs or vice versa.
  92.  
  93.         A virus cannot appear all by itself, it has to be written, just
  94.         like any other program.
  95.         
  96.         Not all viruses are harmful; some may only cause minor damage as
  97.         a side effect.
  98.  
  99.         A virus cannot infect a computer unless it is booted from an
  100.         infected diskette or an infected program is run on it.  Reading
  101.         data from an infected diskette cannot cause an infection.
  102.  
  103.         A write-protected diskette cannot become infected.
  104.  
  105.         There is no way a virus can attach itself to data files, so
  106.         viruses cannot be distributed with them.  However, a BSV can
  107.         be distributed on data diskettes.
  108.  
  109. The F-PROT package will provide protection against viruses, but there are
  110. other methods that also should be used.  Before I list them, I want to
  111. warn you against three methods that are of very limited use.
  112.  
  113. One anti-virus measure consists of making every executable file read-only,
  114. by issuing commands like
  115.  
  116.                         ATTRIB +R *.EXE
  117.  
  118. This is actually not a bad idea, but it will not provide much protection
  119. against viruses.  Most program viruses will remove this protection before
  120. they infect files, and restore it afterwards.  Making files read-only will
  121. of course have no effect on BSVs.  The main purpose of this method is actually
  122. to protect the user from his own mistakes, because this makes it harder to
  123. delete programs by mistake.  However, some viruses are stopped by this
  124. method, "Lehigh" and "South African" in particular.
  125.  
  126. Another method is to hide the COMMAND.COM file, by giving the following
  127. sequence of instructions:
  128.  
  129.         MKDIR C:\HIDDEN
  130.         COPY COMMAND.COM C:\HIDDEN
  131.         DEL COMMAND.COM
  132.  
  133.         add SHELL=C:\HIDDEN\COMMAND.COM /P to CONFIG.SYS
  134.         add SET COMSPEC=C:\HIDDEN\COMMAND.COM to AUTOEXEC.BAT
  135.  
  136. This method is quite useless, to say the least.  Few viruses infect
  137. COMMAND.COM, and some of them are able to do it, even if it has been
  138. hidden, using this method.
  139.  
  140. A third useless method is to change the name of COMMAND.COM and patch other
  141. programs so they use the new name.  Somebody who had only heard of the "Lehigh"
  142. virus got this "bright" idea.  Apparently he thought that all other viruses
  143. operated like it, so he wrote and distributed a program to do this
  144. automatically.  He thought it was a general cure for the virus problem, but
  145. he was wrong.
  146.  
  147. On the other hand, there are a number of ways to provide useful protection.
  148.  
  149.     Rule #1 is: MAKE BACKUPS!!!  Keep good backups (more than one) of
  150.         everything you do not want to lose.  This will not only protect you
  151.         from serious damage caused by viruses, but is also necessary in the
  152.         case of a serious hardware failure.
  153.  
  154.         Never boot a computer with a hard disk from a diskette because that
  155.         is the only way the hard disk could become infected with a BSV.
  156.  
  157.         Should you, by accident, have left a non-bootable diskette in
  158.         drive A: when you turn the computer on, the message
  159.  
  160.                         Not a system disk.
  161.  
  162.         may appear.  If the diskette was infected with a virus, it will now
  163.         be active, but may not have infected the hard disk yet. if this
  164.         happens, turn the computer off, or press the reset button.  It is
  165.         important to note that pressing Ctrl-Alt-Del will not be sufficient,
  166.         as a few viruses can survive that.
  167.  
  168.         If the computer has no hard disk, but is booted from a diskette,
  169.         you should always use the same diskette, and keep it write-protected.
  170.  
  171.         Keep all diskettes write-protected unless you need to write to them.
  172.         When you obtain new software on a diskette, write-protect the
  173.         diskette before you make a backup copy of it.  If it is not possible
  174.         to make a backup of the diskette, because of some idiotic
  175.         copy-protection, I do not recommend using the software.
  176.  
  177.         Be really careful regarding your sources of software.  In general,
  178.         shrink-wrapped commercial software should be "clean", but there
  179.         have been a few documented cases of infected commercial software.
  180.         Public-Domain, Freeware and Shareware packages do not have to be
  181.         any more dangerous - it all depends on the source.  If you obtain
  182.         software from a BBS, check what precautions the SysOp takes against
  183.         viruses.  If he does not screen the software made available for
  184.         downloading, you should find another source.
  185.  
  186.     Check all new software for infection before you run it for the
  187.     first time.  It is even advisable to use a couple of scanners from
  188.     different manufacturers, as no single scanner is able to detect
  189.     all viruses.
  190.  
  191.         Obtain Shareware, Freeware and Public-Domain software from the
  192.         original author, if at all possible.  
  193.  
  194.         Look out for any "unusual" behavior on your computer, like:
  195.  
  196.                 Does it take longer than usually to load programs ?
  197.                 Do unusual error messages appear ?
  198.                 Does the memory size seem to have decreased ?
  199.                 Do the disk lights stay on longer than they used to ?
  200.                 Do files just disappear ?
  201.  
  202. Anything like this might indicate a virus infection.
  203.  
  204. If your computer is infected with a virus - DON'T PANIC!  Sometimes a
  205. badly thought out attempt to remove a virus will do much more damage
  206. than the virus could have done.  If you are not sure what to do, leave
  207. your computer turned off until you find someone to remove the virus for
  208. you.
  209.  
  210. Finally, remember that some viruses may interfere with the disinfection
  211. operation if they are active in memory at that time, so before attempting
  212. to disinfect you MUST boot the computer from a CLEAN system diskette.
  213.  
  214. It is also a good idea to boot from a clean system diskette before
  215. scanning for viruses, as several "stealth" viruses are very difficult do
  216. detect if they are active in memory during virus scanning.
  217.